<h3>Deposit List</h3>

<table class="data">
    <tr class="data">
        <th class="data" width="30px">No</th>
        <th class="data" width="100px">Name</th>
        <th class="data" width="100px">Account Name</th>
        <th class="data" width="100px">Bank</th>
        <th class="data" width="100px">Deposit</th>
        <th class="data" width="100px">Date</th>
        <th class="data" width="100px">Status</th>
        <th class="data" width="100px">Action</th>
    </tr>
    <?php foreach ($rows->result() as $deposit): ?>
            <?php
            $name = $this->deposit->name($deposit->costumer_id);
            foreach ($name->result() as $costumer) {
                $costumer_name = $costumer->name;
            }
            ?>
            <tr class="data">
                <td class="data" width="30px"><?php echo $i ?></td>
                <td class="data" align="center"><?php echo anchor('costumer_lists/show/' . $deposit->costumer_id, $costumer_name) ?></td>
                <td class="data" align="center"><?php echo $deposit->costumer_an ?></td>
                <td class="data" align="center"><?php echo $deposit->costumer_bank ?> - <?php echo $deposit->bank_name ?></td>
                <td class="data" align="right"><?php echo $deposit->deposit ?></td>
                <td class="data" align="center"><?php echo get_tanggal_1($deposit->date) ?></td>
                <td class="data" align="center"><?php echo get_status($deposit->status) ?></td>
                <td class="data">
            <center>
                <?php foreach ($access->result() as $a): ?>
                    <?php if ($deposit->status == 1): ?>
                        <?php echo get_show($a->deposit, 'deposit_admins/show_deposit/', $deposit->id) ?>&nbsp;&nbsp;
                        <?php echo get_delete($a->deposit_delete, 'deposit_admins/not_aprove/', $deposit->id) ?>&nbsp;&nbsp;
                    <?php elseif ($deposit->status == 2): ?>  
                        <?php echo get_confirm($a->deposit_edit, 'deposit_admins/confirm/', $deposit->id) ?>&nbsp;&nbsp;
                    <?php else: ?>
                        <?php echo get_show($a->deposit, 'deposit_admins/show_deposit/', $deposit->id) ?>&nbsp;&nbsp;
                        <?php echo get_delete($a->deposit_delete, 'deposit_admins/not_aprove/', $deposit->id) ?>&nbsp;&nbsp;
                    <?php endif ?>

                <?php endforeach ?>
            </center>    
        </td>
        <?php $i++ ?>
<?php endforeach ?>
</tr>
</table>

<p><?php echo $links; ?></p>